home *** CD-ROM | disk | FTP | other *** search
Java Source | 1997-06-19 | 1.1 KB | 48 lines |
- /*
- * Coordinate.java 1.0 12 Jan 1997
- *
- * Copyright (c) 1996 Krumel & Associates, Inc. All Rights Reserved.
- *
- * This software is provided as is. Krumel & Associates shall not be liable
- * for any damages suffered by licensee as a result of using, modifying or
- * distributing this software or its derivatives.
- */
-
- package symantec.itools.db.awt;
-
- public class Coordinate {
- public int row;
- public int col;
-
- public Coordinate() {}
-
- public Coordinate(Coordinate c) {
- this(c.row, c.col);
- }
-
- public Coordinate(int r, int c) {
- row = r;
- col = c;
- }
-
- public boolean equals(Object o) {
- if (!(o instanceof Coordinate)) {
- return false;
- }
-
- Coordinate c = (Coordinate)o;
- return row == c.row && col == c.col;
- }
-
- public void setRow(int r) { row = r; }
-
- public void setCol(int c) { col = c; }
-
- public int row() { return row; }
-
- public int col() { return col; }
-
- public String toString() {
- return "Coordinate: row=" + row + " col=" + col;
- }
- }